package com.chalk.controller;


import com.chalk.common.util.Result;
import com.chalk.service.SportEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author glq
 * @since 2020-12-10
 */

@RestController
@RequestMapping("/v1/sportEvent")
public class SportEventController {

    @Autowired
    SportEventService sportEventService;

    /**
     * 获取全部的运动项目
     * @return
     */
    @GetMapping("getAllSportEvents")
    public Result getAllSportEvents(){
        return Result.success(sportEventService.getAllSportEvents());
    }

}

